package com.example.bysj.domain;
//201902104061徐中堂
import lombok.*;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

@Slf4j
@Setter
@Getter
@AllArgsConstructor
@ToString
@NoArgsConstructor
public final class GraduateProject implements Comparable<GraduateProject>,Serializable{
	private Integer id;
	//题目
	private String title;
	//分数
	private double score;
	//年份
	private int year;
	//毕设种类 设计，论文
	private GraduateProjectCategory graduateProjectCategory;
	//毕设类型 社会调查，课题研究
	private GraduateProjectType graduateProjectType;
	//状态 提交，审核中，完成
	private GraduateProjectStatus graduateProjectStatus;
	//来源 教学，其他
	private GraduateProjectSource graduateProjectSource;
	//真实性虚拟，仿真，现实
	private GraduateProjectTrueness graduateProjectTrueness;
	//指导老师
	private Teacher teacher;
	//做毕设的学生
	private Student student;

	@Override
	public int compareTo(GraduateProject o) {
		// TODO Auto-generated method stub
		return this.id-o.id;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final GraduateProject other = (GraduateProject) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

}
